from checkin import *
import json
from notice import *
import sys

species = sys.argv[1]
res = ''
with open("config.json", "r", encoding="utf-8") as f:
    datas = json.loads(f.read())
    if species == '1':  # 葫芦侠签到
        print("/************************葫芦侠签到开始****************************/")
        res = res + hlx(datas.get("hlx").get("user"), datas.get("hlx").get("pw"))
        print(res)
    elif species == '2':
        print("/************************哔哩哔哩签到开始****************************/")
        res = res + str(BiliBiliCheckIn(datas.get("bilibili").get("cookie")).main()[0])
        print(res)
    elif species == '3':
        print("/************************天翼云网盘签到开始****************************/")
        result,time = cloud_163(datas.get("cloud_189").get("user"), datas.get("cloud_189").get("pw"))
        res = "【天翼云网盘】\n"+result
        print(res)
    elif species == '4':
        print("/************************网易云音乐签到开始****************************/")
        res = Music163CheckIn(music163_account_list=datas.get("music_163")).main()[0]
    elif species == '5':
        print("/************************腾讯视频签到开始****************************/")
        res = VQQCheckIn(vqq_cookie_list=datas.get("vqq_cookie_lists")).main()[0]
    else:
        print('退出')
        exit(0)
    wx(res, datas.get("wx").get("ID"), datas.get("wx").get("SECRET"))
    print("微信推送成功")
